package com.ruoyi.system.mapper;

import java.util.List;
import com.ruoyi.system.domain.YyDoctor;
import org.apache.ibatis.annotations.Select;

/**
 * 医生Mapper接口
 *
 * @author ruoyi
 * @date 2025-03-24
 */
public interface YyDoctorMapper
{
    /**
     * 查询医生
     *
     * @param doctorId 医生主键
     * @return 医生
     */
    public YyDoctor selectYyDoctorByDoctorId(Long doctorId);

    /**
     * 查询医生列表
     *
     * @param yyDoctor 医生
     * @return 医生集合
     */
    public List<YyDoctor> selectYyDoctorList(YyDoctor yyDoctor);

    /**
     * 新增医生
     *
     * @param yyDoctor 医生
     * @return 结果
     */
    public int insertYyDoctor(YyDoctor yyDoctor);

    /**
     * 修改医生
     *
     * @param yyDoctor 医生
     * @return 结果
     */
    public int updateYyDoctor(YyDoctor yyDoctor);

    /**
     * 删除医生
     *
     * @param doctorId 医生主键
     * @return 结果
     */
    public int deleteYyDoctorByDoctorId(Long doctorId);

    /**
     * 批量删除医生
     *
     * @param doctorIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteYyDoctorByDoctorIds(String[] doctorIds);

    @Select("select doctor_id as doctorId, account, password, name, photo, education, department, major, gender, age, position from yy_doctor where account =#{username}")
    YyDoctor selectYyDoctorByDoctorName(String username);

    @Select("select * from yy_doctor where account =#{account}")
    YyDoctor selectYyPatientByAccount(String account);
}
